package com.tr.rentcar.model.dao;

import java.sql.SQLException;
import java.util.Map;

import com.tr.rentcar.model.bean.ForegrondWebset;
import com.tr.rentcar.model.jdbc.MySqlDb;
import com.tr.rentcar.model.jdbc.ResultHandler;
/**
 * 公司资料dao
 * @author lenovo
 *
 */
public class FWDao implements ResultHandler<ForegrondWebset>{
	private MySqlDb db = MySqlDb.getInstance();
	/**
	 * 查询数据
	 */
	public ForegrondWebset find() throws SQLException {
		String sql = "select * from foregrond_webset";
		return db.queryUninResult(sql, this);
	}
	@Override
	public ForegrondWebset doHander(Map<String, Object> row) {
		ForegrondWebset fc=new ForegrondWebset();
		fc.setFwAddress(row.get("fw_address")+"");
		fc.setFwCode(row.get("fw_code")+"");
		fc.setFwDescribe(row.get("fw_describe")+"");
		fc.setFwIntroduce(row.get("fw_introduce")+"");
		fc.setFwKey(row.get("fw_key")+"");
		fc.setFwLogo(row.get("fw_logo")+"");
		fc.setFwName(row.get("fw_name")+"");
		fc.setFwTel(row.get("fw_tel")+"");
		fc.setFwTitle(row.get("fw_title")+"");
		fc.setFwService(row.get("fw_service")+"");
		return fc;
	}

}
